package com.action.admin.user;


import com.action.BaseAction;
import com.entity.Employee;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.ResultPath;

/**
 * 
 * @author Administrator
 * 
 */
//@ParentPackage("json-default")
@ParentPackage("extendsjson-default")
@Namespace("/user")
@ResultPath("/WEB-INF/pages")
public class UserAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	private static Logger logger = Logger.getLogger(UserAction.class);

	/**
	 * 保存员工增加信息页
	 * 
	 * @return
	 */
	@Action(value = "adduser", results = { 
			@Result(name = "success", location = "user_add.jsp")
			//@Result(name = "login", location = "index.do", type = "redirect"),
			})
	public String addemployee() {
		Employee emp = (Employee) session("userinfo");
		if (emp == null)
			return LOGIN;
		return SUCCESS;
	}
}
